<?php
include ('includes/config.php');
$con = mysql_pconnect($db_server,$db_username,$db_password) or die ('لم أتمكن من الوصول ');
mysql_select_db($db_name) or die ('لم أجد قاعدة البيانات ');

$query = "select id,link,sub from " .$db_prefix . "sb order by rand() limit 5";
$sql = mysql_query ($query);
$t56_num = $DB->sql_num_rows($sql);
$Smarty->assign('t56_num',$t56_num);
$Smarty->display('1sb.tpl');


while($rows=@mysql_fetch_array($sql)) {
$gg[]=$rows;
$Smarty->assign('rows',$rows);

$Smarty->display('2sb.tpl');


}

?>